import socket, sys
host = "127.0.0.1"
port = 6666
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
    s.connect((host, port))
except Exception as e:
    print("server not found!")
    sys.exit()
while True:
    c = input("you say: ")
    s.sendall(c.encode())
    data = s.recv(1024)
    data = data.decode()
    print("revevied: ",data)
    if c.lower() == "bye":
        break
s.close()
